<template>
	<view class="cardstyle">
		<text class="titlebox">{{title}}</text>
		<view class="tipsbox">
			<text v-if="isTop" style="color: #f00;">置顶</text>
			<text>{{author}}</text>
			<text>{{count}}评</text>
			<view style="flex: 1; display: flex; justify-content: flex-end;">
				<text>{{date}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "cardViewText",
		props: {
			title: {
				type: String,
				default: "标题"
			},
			isTop: {
				type: Boolean,
				default: false
			},
			author: {
				type: String,
				default: "来源"
			},
			count: {
				type: Number,
				default: 0
			},
			date: {
				type: String,
				default: "2025.10.01"
			}
		},
		data() {
			return {};
		}
	};
</script>

<style>
.cardstyle {
	padding: 10rpx;
	border-radius: 30rpx;
	background-color: #fff;
	box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
	margin: 10rpx 0;
}
.titlebox {
	display: block;
	font-size: 32rpx;
	font-weight: bold;
	color: #333;
	margin-bottom: 10rpx;
	margin-left: 8rpx;
	line-height: 1.5;
	}
.tipsbox {
	display: flex;
	margin-left: 8rpx;
	align-items: center;
	font-size: 24rpx;
	color: #666;
}
.tipsbox text {
	margin-right: 20rpx;
}
 .tipsbox text:last-child {
	margin-right: 0;
}

</style>